@csrf
<div class="layui-form-item">
    <label for="block" class="layui-form-label">版块</label>
    <div class="layui-input-block">
        <input type="hidden" name='types' value="{{$thesaurus->types}}">
        <input type="text" id="block" name="block" lay-filter="block" class="layui-input"
            value="{{$thesaurus->block??''}}">
    </div>
</div>
<div class="layui-form-item">
    <label for="category" class="layui-form-label">分类</label>
    <div class="layui-input-block">
        <select name="category" placeholder="请选择分类">
            <option value=null></option>
            @foreach($categories as $category)
            @if($thesaurus->category==$category['id'])
            <option value="{{$category['id']}}" selected>{{$category['title']}}</option>
            @else
            <option value="{{$category['id']}}">{{$category['title']}}</option>
            @endif
            @endforeach
        </select>
    </div>
</div>
<div class="layui-form-item">
    <label for="name" class="layui-form-label">名称</label>
    <div class="layui-input-block">
        <input type="text" name="name" class="layui-input" value="{{$thesaurus->name??''}}">
    </div>
</div>
<div class="layui-form-item">
    <label for="name" class="layui-form-label"></label>
    <div class="layui-input-block">
        <input type="hidden" name="status" value="0">
        <input type="checkbox" name="status" lay-skin="primary" value="1" {{$thesaurus->status=='1'?'checked':''}}
            title="有效">
    </div>
</div>
<div class="layui-form-item">
    <label for="description" class="layui-form-label">备注</label>
    <div class="layui-input-block">
        <textarea type="text" name="description" class="layui-textarea"
            value="{{$thesaurus->description??''}}"></textarea>
    </div>
</div>
